package com.hnas.core.app_common.util;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.alibaba.fastjson.JSON;

public class CommonReceiveServerData {

	@SuppressWarnings("rawtypes")
	public static Map getData(HttpServletRequest request,HttpServletResponse response){
		String dataType = request.getParameter("dataType");
		String sendData = request.getParameter("sendData");
		String customData = request.getParameter("customData");		
		Map<String,Object> map = new HashMap<String,Object>();
		if(sendData !=null && dataType !=null && customData !=null){
			map.put("sendData", JSON.parseObject(sendData));
			map.put("dataType", dataType);
			map.put("customData", JSON.parseObject(customData));
		}
		return map;
	}
}
